//
//  HomeViewModel.swift
//  imprint
//
//  Created by 小柠檬🍋 on 2025/2/3.
//

import Foundation
import SwiftUI
class EmojiViewModel : BaseViewModel {
    @Published var tableItem : [HomeTableItem] = []
    
    func getTab() {
        request(isLoading: false) {
            var listItems:[HomeTableItem] = []
            let bean = HomeTableItem(uuid: UUID().uuidString, id: "0", name: "表情包")
            let bean2 = HomeTableItem(uuid: UUID().uuidString, id: "1", name: "通用")
            let bean3 = HomeTableItem(uuid: UUID().uuidString, id: "2", name: "动图")
            let bean4 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean5 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean6 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean7 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean8 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean9 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean10 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean11 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean12 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean13 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean14 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean15 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean16 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            let bean17 = HomeTableItem(uuid: UUID().uuidString, id: "5", name: "小红薯")
            listItems.append(bean)
            listItems.append(bean2)
            listItems.append(bean3)
            listItems.append(bean4)
            listItems.append(bean5)
            listItems.append(bean6)
            listItems.append(bean7)
            listItems.append(bean8)
            listItems.append(bean9)
            listItems.append(bean10)
            listItems.append(bean11)
            listItems.append(bean12)
            listItems.append(bean13)
            listItems.append(bean14)
            listItems.append(bean15)
            listItems.append(bean16)
            listItems.append(bean17)


            return listItems
        } suc: { list in
            self.tableItem = list
        } fail: {
            showLog($0.message)
        }
    }
}
